<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var a= "ffsfsfsf";

    console.log(a);
    console.log("a");


    function fun() {
        window.dduan = 2;
    }
    fun();
    alert(window.dduan);
</script>

</body>
</html>